package org.foreningsgatan.genetics;

import java.io.Serializable;

public class ActionNode<T extends Serializable, S extends Serializable> extends Node<T, S> {
	protected S action;
	
	protected ActionNode(S action) {
		this.action = action;
	}
	
	@Override
	protected Node<T, S> clone() {
		ActionNode<T, S> clone = (ActionNode<T, S>) super.clone();
		clone.action = action;
		
		return clone;
	}

	@Override
	protected void perform(SimulationEnvironment<T, S> environment) {
		environment.perform(action);
	}
}
